{% extends "park/base.html" %}
{% block js %}
    <script type="text/javascript" src="/static/js/echarts/js/esl.js"></script>
    <script src="/static/js/demo_ec/demoecharts.js"></script>
    <script type="text/javascript">
    var primary_menu = "menu_4";
    var sub_menu = "menu_4_1";
    object={}
    $(function(){
        var types = 3;
        $.post("/park/submitStatistics/",{types:types},
                function(data){
                    var list = eval('('+ data+')');
                    object['name']=list.name;
                    object['number']=list.number;
                    object['title']='企业化学品信息统计';
                    object['head']='原辅料';
                    showLineDemo();
                });
    });
        //提交表单
        function onS(){
            var types = $('#types').val();
            $.post("/park/submitStatistics/",{types:types},
                    function(data){
                        var list = eval('('+ data+')');
                        object['name']=list.name;
                        object['number']=list.number;
                        if(types=='1'){
                            object['title']='企业化学品信息统计';
                            object['head']='中间产品';
                        }else if(types=='2'){
                            object['title']='企业产品信息统计';
                            object['head']='产品信息';
                        }else if(types=='3'){
                            object['title']='企业原辅料信息统计';
                            object['head']='原辅料';
                        }else if(types=='4'){
                            object['title']='企业生产区设备统计';
                            object['head']='生产区设备';
                        }else if(types=='5'){
                            object['title']='企业贮罐区设备统计';
                            object['head']='贮罐区设备';
                        }else if(types=='7'){
                            object['title']='特征化学污染物统计';
                            object['head']='特征化学污染物';
                        }
{#                        }else if(types=='8'){#}
{#                            object['title']='各类化学品总量统计';#}
{#                            object['head']='总量';#}
{#                        }#}
                        showLineDemo();
                    });
        }
    </script>
{% endblock %}
{% block content %}
    <div class="col-md-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <div class="panel-title"><h3>化学品统计</h3></div>
                <div class="panel-options">
                    <div class="form-group">
                        <div>
                          <select  id="types" class="time company">

                              <option value="3">原辅料输入</option>
                              <option value="1">中间产品</option>
                                <option value="2">产品信息</option>
                                <option value="4">生产区设备</option>
                                <option value="5">贮罐区设备</option>
                                <option value="7">特征化学污染物</option>
{#                                <option value="8">各类化学品总量</option>#}
                          </select>
                        </div>
                    </div>
                     <button type="button" class="btn btn-green" onclick="onS();">统计</button>
                </div>
            </div>
            <div class="panel-body with-table">

            </div>
        </div>
    </div>
    <div id="right_show" style="height: 700px;"></div>


{% endblock %}
